<template>
  <div>
    <!-- 写秘密 -->
    <div class="secret" v-if="flag">
      <div class="model">
        <div class="model-ask">
          <div class="header1">
            <h3>
              秘密
              <span class="close" @click="close">×</span>
            </h3>
          </div>
          <div class="main">
            <div class="main-title">
              <img :src="this.img" alt>
              <span>有什么秘密想大家分享</span>
            </div>
            <div class="main-ms">
              <div class="ms-des">
                <textarea placeholder v-model="secret"></textarea>
              </div>
            </div>
            <div class="main-foot">
              <div class="main-foot-l">
                <li>
                  <i class="iconfont icon-all-dashang" style="color:#f9bf00"></i>
                  设置金额(1元)
                </li>
                <li>
                  <select>
                    <option value="0">免费秘密</option>
                    <option value="1">付费秘密</option>
                  </select>
                </li>
              </div>
              <div class="main-foot-r" @click="sumbitM">发布秘密</div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div style="background:#f6f6f6;width:100%;height:10px;"></div>
    <Header></Header>
    <div class="index">
      <div class="index_left">
        <!-- 轮播图 -->
        <el-carousel :interval="3000" arrow="always" class="d_jump">
          <el-carousel-item v-for="item in sliderList" :key="item.id">
            <el-row>
              <el-col :span="24">
                <a :href="item.url">
                  <img :src="item.save_path" class="banner_img">
                </a>
              </el-col>
            </el-row>
          </el-carousel-item>
        </el-carousel>
        <!-- 导航 -->
        <div class="index_left_tab">
          <div class="index_left_nav">
            <div class="hot">
              <i class="iconfont icon-all-huore"></i>
              <button @click="$router.push('/hot')">如何提升热度</button>
            </div>
            <li v-for="(tab,index) in tabsName" :key="index">
              <a
                href="#"
                class="tab-link"
                @click="tabsSwitch(index)"
                v-bind:class="{active:tab.isActive}"
              >{{tab.name}}</a>
            </li>
            <!-- <li style="padding-left:30px; cursor: pointer;" @click="$router.push('/pkQuestion')">PK问答</li> -->
          </div>
          <div class="index_left_content">
            <div class="tab-card" style="display: block;">
              <div class="tab_container" v-for="(item,index) in allList" :key="index">
                <p v-if="item.type == 1" @click="getQuestion(item)">{{item.title}}</p>
                <p v-if="item.type == 2" @click="getArticle(item)">{{item.title}}</p>
                <p v-if="item.type == 3" >{{item.title}}</p>
                <div class="tab_content">
                  <!-- <div class="tab_left" v-if="item.type ==2">
                    <img :src="item.cover" alt>
                  </div>-->
                  <div class="tab_left" v-if="item.type ==1"></div>
                  <div class="tab_right">
                    <div  class="tab_new" v-if="item.type == 1"  @click="getQuestion(item)">
                         <span v-html="item.description" ></span>
                          <span class="more2">查看全文</span>
                      </div>
                    <div class="tab_article" v-if="item.type == 2" @click="getArticle(item)">
                      <div class="tab-article_left">
                        <img :src="item.cover" alt>
                      </div>
                      <div class="tab_article_right" >
                        <span v-html="item.content" ></span>
                        <span class="more1">查看全文</span>
                      </div>
                    </div>
                    <!-- <div class="tab_secret" v-if="item.type == 3" v-html="item.title">
                       {{item.title}}
                    </div> -->
                    <div class="tab_right_menu">
                      <button v-if="item.type ==1">PK问答</button>
                      <button v-if="item.type ==2">文章</button>
                      <button v-if="item.type ==3">秘密</button>
                      <li @click="comment(item,index)" v-if="item.type == 1">
                        <i class="iconfont icon-all-pinglun2"></i>
                        回复&nbsp;&nbsp;(
                        <span>{{item.answers}}</span>)
                      </li>
                      <li @click="comment(item,index)" v-if="item.type == 2 || item.type == 3">
                        <i class="iconfont icon-all-pinglun2"></i>
                        评论&nbsp;&nbsp;(
                        <span>{{item.comments}}</span>)
                      </li>
                      <li
                        style="position: relative;"
                        @mouseenter="enter(index)"
                        @mouseleave="leave(index)"
                      >
                        <i class="iconfont icon-all-daohang"></i>
                        分享
                        <div class="fx" v-if="index == j">
                          <i
                            class="iconfont icon-all-weixin"
                            style="color:#24db5a"
                            @mouseenter="enterW(item,index)"
                            @mouseleave="leaveW(index)"
                          ></i>
                          <i class="iconfont icon-all-weibo" style="color:#ea5d5c"></i>
                        </div>
                        <div class="rwm" v-if="index == x">
                          <img :src="erweima_url" alt>
                        </div>
                      </li>
                      <li @click="go(item)">
                        <i class="iconfont icon-all-like"></i>
                        点赞&nbsp;&nbsp;(
                        <span>{{item.supports}}</span>)
                      </li>
                      <li @click="go(item)">
                        <i class="iconfont icon-all-shoucang2"></i>
                        关注&nbsp;&nbsp;(
                        <span>{{item.followers}}</span>)
                      </li>
                      <li>
                        <i class="iconfont icon-all-dashang" style="color:#f9bf00"></i>
                        金额
                      </li>
                    </div>
                  </div>
                  <div class="container" v-if="index == i">
                    <textarea name="comment" placeholder="欢迎留言讨论~！" v-model="text"></textarea>
                    <div class="container-foot">
                      <span class="qx" @click="cancel(item,index)">取消回复</span>
                      <input class="comment-submit" type="submit" value="发布" @click="sumbit">
                    </div>
                  </div>
                </div>
              </div>
              <div class="more">
                <span @click="getMore">加载更多</span>
              </div>
            </div>
            <div class="tab-card">
              <div class="tab_container">
                <p>手机1是如何组成的？</p>
                <div class="tab_content">
                  <div class="tab_left">
                    <img src="../../assets/images/card.jpg" alt>
                    <button>我要PK</button>
                  </div>
                  <div class="tab_right">
                    <div class="tab_right_content">
                      因为 VsCode 默认启用了根据文件类型自动设置tabsize的选项，在设置中添加：
                      因为 VsCode 默认启用了根据tabsize的选项，在设置中添加
                      ：
                      <span>阅读全文<<</span>
                    </div>
                    <div class="tab_right_menu">
                      <li>
                        <i class="iconfont icon-all-pinglun2"></i>
                        评论
                      </li>
                      <li>
                        <i class="iconfont icon-all-daohang"></i>
                        分享
                      </li>
                      <li>
                        <i class="iconfont icon-all-shoucang1"></i>
                        收藏
                      </li>
                      <li>
                        <i class="iconfont icon-all-aixin1"></i>
                        投票
                      </li>
                      <li>
                        <i class="iconfont icon-all-dashang"></i>
                        打赏
                      </li>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="tab-card">
              <!-- <div class="tab_container">
                <p>手机2是如何组成的？</p>
                <div class="tab_content">
                  <div class="tab_left">
                    <img src="../../assets/images/card.jpg" alt>
                    <button>我要PK</button>
                  </div>
                  <div class="tab_right">
                    <div class="tab_right_content">
                      因为 VsCode 默认启用了根据文件类型自动设置tabsize的选项，在设置中添加：
                      因为 VsCode 默认启用了根据tabsize的选项，在设置中添加
                      ：
                      <span>阅读全文<<</span>
                    </div>
                    <div class="tab_right_menu">
                      <li>
                        <i class="iconfont icon-all-pinglun2"></i>
                        评论
                      </li>

                      <li>
                        <i class="iconfont icon-all-daohang"></i>
                        分享
                      </li>
                      <li>
                        <i class="iconfont icon-all-shoucang1"></i>
                        收藏
                      </li>
                      <li>
                        <i class="iconfont icon-all-aixin1"></i>
                        投票
                      </li>
                      <li>
                        <i class="iconfont icon-all-dashang"></i>
                        打赏
                      </li>
                    </div>
                  </div>
                </div>
              </div>-->
            </div>
            <div class="tab-card">
              <div class="tab_container" v-for="(item,index) in questionList" :key="index">
                <p @click="getQuestion(item)">{{item.title}}</p>
                <div class="tab_content">
                  <div class="tab_left">
                    <!-- <img src="../../assets/images/card.jpg" alt> -->
                  </div>
                  <div class="tab_right">
                    <div
                      class="tab_right_content"
                      v-html="item.description"
                      @click="getQuestion(item)"
                    >
                      {{item.description}}
                      <!-- <span>阅读全文<<</span> -->
                    </div>
                    <div class="tab_right_menu">
                      <button>我要PK</button>
                      <li @click="comment(item,index)">
                        <i class="iconfont icon-all-pinglun2"></i>
                        回复&nbsp;&nbsp;(
                        <span>{{item.answers}}</span>)
                      </li>
                      <li
                        style="position: relative;"
                        @mouseenter="enter(index)"
                        @mouseleave="leave(index)"
                      >
                        <i class="iconfont icon-all-daohang"></i>
                        分享
                        <div class="fx" v-if="index == j">
                          <i
                            class="iconfont icon-all-weixin"
                            style="color:#24db5a"
                            @mouseenter="enterW(item,index)"
                            @mouseleave="leaveW(index)"
                          ></i>
                          <i class="iconfont icon-all-weibo" style="color:#ea5d5c"></i>
                        </div>
                        <div class="rwm" v-if="index == x">
                          <img src="erweima_url" alt>
                        </div>
                      </li>
                      <li @click="go(item)">
                        <i class="iconfont icon-all-like"></i>
                        点赞&nbsp;&nbsp;(
                        <span>{{item.supports}}</span>)
                      </li>
                      <li @click="go(item)">
                        <i class="iconfont icon-all-shoucang2"></i>
                        关注&nbsp;&nbsp;(
                        <span>{{item.followers}}</span>)
                      </li>
                      <li>
                        <i class="iconfont icon-all-dashang" style="color:#f9bf00"></i>
                        金额
                      </li>
                    </div>
                  </div>
                  <div class="container" v-if="index == i">
                    <textarea name="comment" placeholder="欢迎留言讨论~！" v-model="text"></textarea>
                    <div class="container-foot">
                      <span class="qx" @click="cancel(item,index)">取消回复</span>
                      <input class="comment-submit" type="submit" value="发布" @click="sumbit">
                    </div>
                  </div>
                </div>
              </div>
              <div class="more">
                <span @click="getMorePK">加载更多</span>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="index_right">
        <div class="index_right_tab">
          <div class="index_right_nav">
            <li @click="secretFlag">
              <i class="iconfont icon-all-mimi" style="color:#f9bf00;margin-left:5px;" ></i>
              <span class="tab-link" >写秘密</span>
            </li>
            <li @click="goSpecia">
              <i class="iconfont icon-all-combinedshapecopy2" style="color:#f9bf00"></i>
              <span class="tab-link" >写文章</span>
            </li>
            <li @click="goQuestion">
              <i class="iconfont icon-all-wenda" style="color:#f9bf00"></i>
              <span class="tab-link" >全部问答</span>
            </li>
          </div>
          <div class="index_right_content">
            <div class="tab-card1" style="display: block;">
              <div class="title">
                <span class="news">热门秘密</span>
                <span class="more" @click="goSelect">>>更多秘密</span>
              </div>
              <div class="content" v-for="(item,index) in secretList" :key="index">
                <p>
                  <img :src="item.avatar" alt>
                  <span>{{item.nickname}}</span>
                </p>
                <div>
                  {{item.title}}
                  <span>>>查看全密</span>
                </div>
              </div>
            </div>
            <div class="tab-card1" style="display: block;">
              <div class="title">
                <span class="news">热门文章</span>
                <span class="more" @click="getAll">>>更多文章</span>
              </div>
              <div class="content" v-for="(item,index) in articleList" :key="index">
                <p>
                  <img :src="item.avatar" alt>
                  <span>{{item.title}}</span>
                </p>
                <div>
                  {{item.content}}
                  <span @click="getArticle(item)">>>查看全文</span>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="banner">
          <div class="title">
            <div class="qz">热门圈子</div>
            <div class="box"></div>
          </div>
          <div class="guide">
            <div class="left">
              <li>
                产品经理
                <span>加入</span>
              </li>
              <li>
                产品经理
                <span>加入</span>
              </li>
              <li>
                产品经理
                <span>加入</span>
              </li>
              <li>
                产品经理
                <span>加入</span>
              </li>
              <li>
                产品经理
                <span>加入</span>
              </li>
            </div>
            <div class="right">
              <img src="../../assets/images/rwm.png" alt>
            </div>
          </div>
        </div>
        <div class="haracter">
          <div class="title">
            <div class="qz">热门专家</div>
            <div class="box" @click="getAllSpecialist">更多专家></div>
          </div>
          <div class="content" v-for="(item,index) in specialist" :key="index">
            <div class="content_t">
              <div class="content_t_left">
                <div class="img">
                  <img :src="item.icon" alt>
                </div>
                <div class="js">
                  <h1>{{item.realname}}</h1>
                  <p>
                    <span>{{item.skill}}</span>
                    <span></span>
                  </p>
                </div>
              </div>
              <div class="content_t_right">
                <span>
                  <img src="../../assets/images/icon.jpg" alt>
                </span>
                365篇文章
              </div>
            </div>
            <div class="content_f">{{item.description}}</div>
          </div>
        </div>
        <div class="msg">
          <div class="title">
            <div class="qz"></div>
            <div class="box"></div>
          </div>
          <div class="content">
            <p>©2018讨教问答</p>
            <p>讨教问答合作邮箱:wendahz@toutiao.com</p>
            <p>讨教问答侵权投诉渠道:ask@bytedance.com</p>
            <p>京ICP备12025439号-14</p>
            <P class="sm" @click="$router.push('/state')">《免责申明内容》</P>
          </div>
        </div>
      </div>
    </div>
    <!-- 用户未登陆提示框 -->
    <div class="notlogin" v-if="notlogin">
      <div class="modelLogin">
        <div class="title">
          <span class="tip">提示</span>
          <span class="close" @click="closeModel">×</span>
        </div>
        <div class="content">
          <i class="iconfont icon-all-jinggao-"></i>
          当前登陆状态失效
        </div>
        <div class="foot">
          <button class="primay" @click="goIndex">前往首页</button>
          <button class="type" @click="$router.push('/login')">重新登陆</button>
        </div>
      </div>
    </div>
    <!-- 用户不是专家提示框 -->
    <div class="author" v-if="author">
      <div class="modelLogin">
        <div class="title">
          <span class="tip">提示</span>
          <span class="close" @click="closeAuthor">×</span>
        </div>
        <div class="content">
          <i class="iconfont icon-all-jinggao-"></i>
          您当前没有发布文章的权限,请先申请入驻成为专家
        </div>
        <div class="foot">
          <button class="primay" @click="closeAuthor">取消</button>
          <button class="type" @click="$router.push('/number')">申请入驻</button>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import Header from "@/common/Header/Header";
// import Slider from "@/common/Slider/Slider";
import QRious from "qrious";
import qs from "qs";
export default {
  name: "index",
  data() {
    return {
      // errorIMG: 'this.src="require(assets/images/card.jpg)"',
      actir: false,
      question: false,
      pk: true,
      show1: false,
      pageIndex: 1,
      sizeIndex: 5,
      questionIndex: 10,
      articleList: [],
      sliderList: [],
      allList: [],
      questionList: [],
      specialist: [],
      notlogin: false,
      tabsName: [
        {
          name: "热门",
          isActive: true
        },
        {
          name: "推荐",
          isActive: false
        },
        {
          name: "关注",
          isActive: false
        },
        {
          name: "PK问答",
          isActive: false
        }
      ],
      active: false,
      i: -1,
      j: -1,
      k: -1,
      x: -1,
      show: false,
      text: "",
      type: "",
      id: "",
      secretList: [],
      flag: false,
      secret: "",
      // scShow:'',
      wxShow: false,
      rwmMsg: {},
      erweima_url: "",
      author: false
    };
  },
  mounted() {
    // console.info(this.getCookie("token"));
    // console.info(this.getCookie("token"));
    this.img = this.getCookie("nm_avatar");
  },
  methods: {
    tabsSwitch: function(tabIndex) {
      var tabCardCollection = document.querySelectorAll(".tab-card"),
        len = tabCardCollection.length;
      for (var i = 0; i < len; i++) {
        tabCardCollection[i].style.display = "none";
        this.tabsName[i].isActive = false;
      }
      this.tabsName[tabIndex].isActive = true;
      tabCardCollection[tabIndex].style.display = "block";
    },
    // 热门评论框
    comment(item, index) {
      this.text = "";
      this.id = item.id;
      this.type = item.type;
      this.i = index;
    },
    cancel(item, index) {
      this.i = -1;
    },
    goQuestion() {
      if (this.getCookie("member_id")) {
        // this.$router.push("/pkQuestion");
        this.$router.push({ path: "/pkQuestion" });
      } else {
        this.notlogin = true;
      }
    },
    goSelect() {
      if (this.getCookie("member_id")) {
        this.$router.push("/allSecret");
      } else {
        this.notlogin = true;
      }
    },
    //发布文章
    goSpecia() {
      //判断用户是否登录
      if (this.getCookie("member_id")) {
        //判断是否是专家
        if (this.getCookie("identity_type") == 2) {
          this.$router.push("/editor");
        }
        if (this.getCookie("identity_type") == 1) {
          this.author = true;
        }
      } else {
        this.notlogin = true;
      }
    },
    //热门评论
    sumbit() {
      if (this.getCookie("member_id")) {
        //评论内容不能为空
        if (this.text == "") {
          this.$confirm("评论内容不能为空", "提示", {
            type: "warning"
          });
          return;
        }
        let param = {
          table_type: this.type,
          source_id: this.id,
          member_id: this.getCookie("member_id"),
          content: this.text
        };
        this.$axios
          .post("/api/App/User/News/all_comment", qs.stringify(param), {
            headers: { "Content-Type": "application/x-www-form-urlencoded" }
          })
          .then(res => {
            this.$alert("评论成功", "提示", {
              confirmButtonText: "确定"
            });
            this.i = -1;
          });
        this.getallList();
      } else {
        this.notlogin = true;
      }
    },
    //请求热门列表首次显示10条
    getallList() {
      let param = {
        p: this.pageIndex,
        limit: this.sizeIndex
      };
      this.$axios
        .post(
          "api/App/User/Question/all_list",
          qs.stringify(param),
          this.configHeader("post")
        )
        .then(res => {
          // console.log(res.data.data);
          this.allList = res.data.data;
        });
    },
    //获取专家列表展示
    getspecialist() {
      this.$axios
        .get("api/App/User/Apply/apply_get_list?limit=2", {})
        .then(res => {
          this.specialist = res.data.data.list;
          // console.log(this.specialist)
        });
    },
    //获取问答展示列表
    getquestionList() {
      this.$axios
        .get(
          "api/App/User/Question/get_list?limit=" +
            this.questionIndex +
            "&web=1",
          {}
        )
        .then(res => {
          this.questionList = res.data.data.list;
        });
    },
    //获取文章展示列表
    getarticleList() {
      this.$axios.get("api/App/User/News/get_list?limit=2", {}).then(res => {
        this.articleList = res.data.data.list;
        // console.log(this.articleList)
      });
    },
    //加载更多分类 每次加载增加10条
    getMore() {
      if (this.getCookie("member_id")) {
        this.sizeIndex = this.sizeIndex + 5;
        let param = {
          p: this.pageIndex,
          limit: this.sizeIndex
        };
        this.$axios
          .post("api/App/User/Question/all_list", qs.stringify(param), {
            headers: { "Content-Type": "application/x-www-form-urlencoded" }
          })
          .then(res => {
            this.allList = res.data.data;
          });
      } else {
        this.notlogin = true;
      }
    },
    //获取更多的PK问答
    getMorePK() {
      if (this.getCookie("member_id")) {
        this.questionIndex = this.questionIndex + 10;
        this.$axios
          .get("api/App/User/Question/get_list?limit=" + this.questionIndex, {})
          .then(res => {
            this.questionList = res.data.data.list;
          });
      } else {
        this.notlogin = true;
      }
    },
    //查看全部文章
    getAll() {
      if (this.getCookie("member_id")) {
        this.$router.push({
          path: "/classification",
          query: { infoId: 0 }
        });
      } else {
        this.notlogin = true;
      }
    },
    //查看全文
    getArticle(item) {
      if (this.getCookie("member_id")) {
        this.$router.push({ path: "/article", query: { article_id: item.id } });
      } else {
        this.notlogin = true;
      }
    },
    //查看问答
    getQuestion(item) {
      console.log(item)
      // return;
      if (this.getCookie("member_id")) {
        this.$router.push({
          path: "/replyQuestion",
          query: { questions_id: item.id }
        });
      } else {
        this.notlogin = true;
      }
    },
    //查看更多专家
    getAllSpecialist() {
      if (this.getCookie("member_id")) {
        this.$router.push("/specialist");
      } else {
        this.notlogin = true;
      }
    },
    //获取秘密
    getSecret() {
      this.$axios.get("api/App/User/Mimi/get_list?limit=2", {}).then(res => {
        this.secretList = res.data.data.list;
      });
    },
    //秘密弹框
    secretFlag() {
      if (this.getCookie("member_id")) {
        this.flag = true;
      } else {
        this.notlogin = true;
      }
    },
    //关闭秘密弹窗
    close() {
      this.flag = false;
    },
    //发布秘密
    sumbitM() {
      if (this.secret === "") {
        this.$confirm("秘密不能为空", "提示", {
          type: "warning"
        });
        return;
      }
      let param = {
        title: this.secret,
        member_id: this.getCookie("member_id"),
        mimi_type: 1
      };
      this.$axios
        .post("/api/App/User/Mimi/publish", qs.stringify(param), {
          headers: { "Content-Type": "application/x-www-form-urlencoded" }
        })
        .then(res => {
          this.$alert("操作成功", "提示", {
            confirmButtonText: "确定"
          });
          this.flag = false;
          this.getallList();
        });
    },
    // 分享弹框列表
    enter(index) {
      this.j = index;
    },
    leave(index) {
      this.j = -1;
    },
    // 二维码显示
    enterW(item, index) {
      console.log(item);
      let param = {
        feed_id: item.id,
        member_id: this.getCookie("member_id"),
        type: item.type
      };
      this.$axios
        .post("/api/App/User/Other/web_share", qs.stringify(param), {
          headers: { "Content-Type": "application/x-www-form-urlencoded" }
        })
        .then(res => {
          // console.log(res.data.data.qrcode);
          // this.rwmMsg = res.data.data;
          // console.log(this.rwmMsg.url, 111);
          let qr = new QRious({
            value: res.data.data.url,
            background: "white",
            //backgroundAlpha: 0.8,
            foreground: "black",
            //foregroundAlpha: 0.8,
            level: "H",
            padding: 0,
            size: 160
          });
          this.erweima_url = qr.toDataURL();
          console.log(this.erweima_url);
          this.x = index;
          this.getallList();
        });
    },
    leaveW(index) {
      this.x = -1;
    },
    //根据type 不同跳转到对于类型的页面
    go(item) {
      if (this.getCookie("member_id")) {
        if (item.type == 1) {
          this.$router.push({
            path: "/replyQuestion",
            query: { questions_id: item.id }
          });
        } else if (item.type == 2) {
          this.$router.push({
            path: "/article",
            query: { article_id: item.id }
          });
        }
      } else {
        this.notlogin = true;
      }
    },
    closeModel() {
      this.notlogin = false;
    },
    closeAuthor() {
      this.author = false;
    },
    goIndex() {
      this.notlogin = false;
      this.$router.push({ path: "/" });
    },
    //获取首页轮播图
    getSlider() {
      this.$axios
        .post("/api/App/User/Other/banner", {
          headers: { "Content-Type": "application/x-www-form-urlencoded" }
        })
        .then(res => {
          // console.log(res)
          this.sliderList = res.data.data.list;
          console.log(this.sliderList);
        });
    }
  },
  created() {
    this.getallList();
    this.getarticleList();
    this.getquestionList();
    this.getspecialist();
    this.getSecret();
    this.getSlider();
  },
  components: {
    Header
    // Slider
  }
};
</script>
<style lang="scss" scoped>
.index {
  width: 1000px;
  height: auto;
  margin: 0 auto;
  margin-top: 20px;
  // margin-top: 100px;
  display: flex;
  justify-content: space-between;
  // background: #fff;
  .index_left {
    width: 640px;
    margin-right: 40px;
    background: #f8f9fd;
    .index_left_tab {
      width: 100%;
      .index_left_nav {
        height: 30px;
        margin-top: 10px;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        // padding: 0 80px;
        position: relative;
        background: #fff;
        margin-top: 20px;
        .hot {
          width: 120px;
          position: absolute;
          top: -4px;
          left: 0px;
          text-align: left;
          &:hover {
            button {
              display: block;
            }
          }
          i {
            font-size: 24px;
            color: red;
            cursor: pointer;
          }
          button {
            outline: none;
            display: none;
            border: 0;
            border-radius: 10px;
            font-size: 12px;
            // margin-left: px;
            cursor: pointer;
          }
        }
        li {
          z-index: 10;
          list-style: none;
          font-size: 20px;
          margin-left:40px;
          .tab-link {
            color: #000;
            display: block;
            // width: 120px;
            text-align: center;
            text-decoration: none;
            cursor: pointer;
            &:hover {
              text-decoration: underline;
              color: #5d90be;
            }
          }
        }
      }
      .index_left_content {
        margin-top: 25px;
        .tab-card {
          display: none;
          .tab_container {
            background: #fff;
            padding: 0 30px;
            height: auto;
            margin-top: 20px;
            p {
              color: #000;
              font-size: 16px;
              text-align: left;
              letter-spacing: 3px;
              padding-top: 10px;
              cursor: pointer;
            }
            .tab_content {
              // display: flex;
              // justify-content: space-between;
              position: relative;
              .tab_left {
                // width: 25%;

                img {
                  display: block;
                  width: 120px;
                  height: 90px;
                  position: absolute;
                  left: 0;
                  top: 0;
                }
              }
              .tab_right {
                position: relative;
                // margin-left: 10px;
                .tab_new {
                  text-align: left;
                  height: auto;
                  font-size: 12px;
                  color: #7a7b7c;
                  line-height: 2;
                  cursor: pointer;
                }
                .tab_article {
                  display: flex;
                  justify-content: space-between;
                  align-items: center;
                  height: auto;
                  .tab-article_left {
                    width: 150px;
                    height: 100%;
                    margin-right: 10px;
                    img {
                      display: block;
                      width: 150px;
                      height: 100px;
                      border-radius: 10px;
                    }
                  }
                  .tab_article_right {
                    text-align: left;
                    height: auto;
                    font-size: 12px;
                    color: #7a7b7c;
                    line-height: 2;
                    cursor: pointer;
                  }
                }
                .tab_secret{
                  text-align: left;
                  height: auto;
                  font-size: 12px;
                  color: #7a7b7c;
                  line-height: 2;
                  cursor: pointer;
                }
                .tab_right_content {
                  text-align: left;
                  height: auto;
                  font-size: 12px;
                  color: #7a7b7c;
                  line-height: 2;
                  cursor: pointer;
                }
                .more1 {
                  color: #5d90be;
                  margin-left:5px;
                }
                .more2 {
                  color: #5d90be;
                  margin-left:5px;
                }
                .tab_right_menu {
                  width: 65%;
                  margin-left: 25%;
                  margin-top: 25px;
                  padding-bottom: 10px;
                  display: flex;
                  justify-content: space-between;
                  align-items: center;
                  button {
                    position: absolute;
                    left: 30px;
                    // top: 50px;
                    bottom: 10px;
                    height: 20px;
                    width: 55px;
                    border-radius: 10px;
                    color: #fff;
                    background-color: #5d90be;
                    outline: none;
                    border: 0px;
                    font-size: 10px;
                    margin-top: 10px;
                    // z-index: 10000;
                  }
                  li {
                    list-style: none;
                    font-size: 10px;
                    color: #000;
                    margin-top: 10px;
                    cursor: pointer;
                  }
                }
                .fx {
                  position: absolute;
                  bottom: 20px;
                  left: 0;
                  width: 50px;
                  height: 30px;
                  display: flex;
                  justify-content: space-around;
                  align-items: center;
                  background: #d3d3d3;
                  border-radius: 10px;
                }
                .rwm {
                  position: absolute;
                  bottom: 60px;
                  left: -40px;
                  width: 160px;
                  height: 160px;
                  // background: red;
                  z-index: 666;
                  img {
                    width: 100%;
                    height: 100%;
                  }
                }
              }
              .container {
                padding-top: 15px;
                textarea {
                  resize: none;
                  border-radius: 5px;
                  border: 0;
                  width: 100%;
                  font-size: 12px;
                  height: 100px;
                  outline: none;
                }
                .container-foot {
                  padding-top: 10px;
                  padding-bottom: 10px;
                  text-align: right;
                  // display: flex;
                  // justify-content: space-between;
                  span {
                    padding-right: 20px;
                    cursor: pointer;
                  }
                  .comment-submit {
                    border: 1px solid #5079b7;
                    background-color: #fff;
                    color: #5079b7;
                    display: inline-block;
                    padding: 0 10px;
                    border-radius: 5px;
                    font-size: 14px;
                    line-height: 23px;
                    height: 24px;
                    cursor: pointer;
                    outline: none;
                  }
                  .smilies-wrapper {
                    cursor: pointer;
                    position: relative;
                    .button--smile {
                      font-size: 12px;
                      .fa {
                        font-size: 20px;
                        display: inline-block;
                        margin-right: 6px;
                        vertical-align: -3px;
                      }
                      i {
                        width: 30px;
                        height: 30px;
                        background: red;
                      }
                    }
                    .my-smilies {
                      background-color: #fff;
                      border: 1px solid #eee;
                      border-radius: 5px;
                      display: none;
                      left: -36px;
                      padding: 10px;
                      position: absolute;
                      top: 40px;
                      width: 210px;
                      z-index: 1;
                    }
                  }
                }
              }
            }
          }
          .more {
            background-color: #fff;
            width: 100%;
            height: 60px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            span {
              display: block;
              width: 100px;
              height: 30px;
              line-height: 30px;
              margin: 0 auto;
              background: #aed6ff;
              border-radius: 5px;
              cursor: pointer;
              color: #fff;
            }
          }
        }
      }
    }
  }
  .index_right {
    width: 320px;
    // background: #f8f9fd;
    .index_right_tab {
      width: 100%;
      height: auto;
      .index_right_nav {
        background: #fff;
        height: 50px;
        // margin-top: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        li {
          width: 117px;
          list-style: none;
          font-size: 18px;
          display: flex;
          flex-wrap: wrap;
          align-items: center;
           cursor: pointer;
          span{
            margin-left:10px;
          }
          i{
            display: block;
            width: 20px;
            height: 20px;
          }
          .tab-link {
            color: #000;
            display: block;
            text-align: center;
            text-decoration: none;
           
            &:hover {
              // text-decoration:underline;
              color: #5d90be;
            }
          }
        }
      }
      .index_right_content {
        margin-top: 20px;
        // background: #fff;
        .tab-card1 {
          height: auto;
          display: none;
          margin-bottom: 20px;
          background: #fff;
          .title {
            font-size: 20px;
            padding: 0 20px;
            padding-top: 5px;
            color: #5d90be;
            display: flex;
            justify-content: space-between;
            .more {
              color: #9f9f9f;
              font-size: 12px;
              display: inline-block;
              width: 70px;
              height: 30px;
              line-height: 30px;
              cursor: pointer;
            }
          }
          .content {
            margin-top: 10px;
            height: auto;
            div {
              color: #7a7b7c;
            }
            p {
              text-align: left;
              margin-left: 20px;
              display: flex;
              justify-content: flex-start;
              img {
                display: inline-block;
                width: 30px;
                height: 30px;
                border-radius: 50%;
              }
              span {
                display: inline-block;
                color: #5d90be;
                font-size: 10px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                line-height: 30px;
                padding-left: 10px;
                padding-right: 30px;
              }
            }
            div {
              // height: 155px;
              margin-top: -10px;
              text-align: left;
              padding: 0 15px;
              font-size: 12px;
              letter-spacing: 2px;
              padding-bottom: 10px;
              // overflow: hidden;
              //   text-overflow:ellipsis;
              // white-space: nowrap;
              span {
                color: #5d90be;
                margin-left: 10px;
                letter-spacing: 1px;
                cursor: pointer;
              }
            }
          }
        }
      }
    }
    .banner {
      background: #fff;
      margin-top: 20px;
      height: 230px;
      .title {
        text-align: left;
        width: 280px;
        margin-left: 20px;
        border: none;
        // background: #f8f9fd;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .qz {
          font-size: 20px;
          width: 80px;
          height: 35px;
          color: #5d90be;
          border-bottom: 3px solid #5d90be;
        }
        .box {
          width: 200px;
          height: 35px;
          border-bottom: 3px solid #9f9f9f;
        }
      }
      .guide {
        width: 280px;
        margin-left: 20px;
        margin-top: 20px;
        display: flex;
        justify-content: space-around;
        align-items: center;
        background: #f8f9fd;
        .left {
          width: 60%;
          // overflow: hidden;
          margin-left: 20px;

          li {
            height: 30px;
            // width: 50%;
            // width: 100px;
            // float: left;
            text-align: left;
            list-style: none;
            font-size: 14px;
            color: #7a7b7c;
            padding-top: 5px;

            span {
              margin-left: 10px;
              display: inline-block;
              height: 20px;
              width: 40px;
              font-size: 10px;
              color: #5d90be;
              background: #fff;
              border: 1px solid #5d90be;
              border-radius: 10px;
              text-align: center;
            }
          }
        }
        .right {
          width: 30%;
          height: 100px;
          margin-right: 30px;
          img {
            width: 100px;
            height: 100px;
            // margin-top: -20px;
          }
        }
      }
    }
    .haracter {
      background: #fff;
      margin-top: 10px;
      // height: 300px;
      .title {
        text-align: left;
        width: 280px;
        margin-left: 20px;
        border: none;
        background: #f8f9fd;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .qz {
          font-size: 20px;
          width: 80px;
          height: 35px;
          color: #5d90be;
          border-bottom: 3px solid #5d90be;
        }
        .box {
          width: 180px;
          height: 35px;
          border-bottom: 3px solid #9f9f9f;
          text-align: right;
          font-size: 13px;
          line-height: 35px;
          cursor: pointer;
        }
      }
      .content {
        width: 280px;
        // height: 100px;
        margin-left: 20px;
        // margin-bottom: 40px;
        background-color: #f8f9fd;

        .content_t {
          margin-top: 20px;
          padding-top: 10px;
          width: 100%;
          display: flex;
          justify-content: space-between;
          .content_t_left {
            width: 60%;
            display: flex;
            justify-content: flex-start;
            img {
              width: 40px;
              height: 40px;
              border-radius: 50%;
            }
            .js {
              padding-left: 15px;
              h1 {
                font-size: 16px;
                text-align: left;
              }
              p {
                color: #5d90be;
                font-size: 14px;
              }
            }
          }
          .content_t_right {
            width: 40%;
            font-size: 14px;
            // box-sizing: border-box;
            padding-left: 10px;
          }
        }
        .content_f {
          text-align: left;
          font-size: 14px;
          padding-bottom: 10px;
        }
      }
    }
    .msg {
      background: #fff;
      margin-top: 10px;
      .title {
        text-align: left;
        width: 280px;
        margin-left: 20px;
        border: none;
        background: #f8f9fd;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .qz {
          width: 80px;
          height: 10px;
          color: #5d90be;
          border-bottom: 3px solid #5d90be;
        }
        .box {
          width: 180px;
          height: 10px;
          border-bottom: 3px solid #9f9f9f;
          text-align: right;
          line-height: 35px;
        }
      }
      .content {
        text-align: left;
        padding: 0 20px;
        height: 180px;
        p {
          font-size: 12px;
          color: #9f9f9f;
          margin-top: 10px;
          height: 20px;
        }
        .sm {
          cursor: pointer;
          // color:red;
        }
      }
    }
  }
}
.secret {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: 100%;
  background: #666;
  background: rgba(64, 64, 64, 0.9);
  // display: none;
  .model {
    position: absolute;
    left: 0;
    top: 50%;
    -ms-transform: translate(0, -50%);
    -webkit-transform: translate(0, -50%);
    -moz-transform: translate(0, -50%);
    transform: translate(0, -50%);
    max-height: 100%;
    overflow: auto;
    width: 100%;
    .model-ask {
      width: 660px;
      -webkit-border-radius: 4px;
      border-radius: 4px;
      background: #fff;
      margin: 10px auto;
      .header1 {
        width: 660px;
        height: 44px;
        border-bottom: 1px solid #f0f1f3;
        h3 {
          position: relative;
          color: #333;
          width: 660px;
          font-size: 14px;
          line-height: 44px;
          text-indent: 20px;
          .close {
            display: block;
            width: 40px;
            height: 0px;
            font-size: 65px;
            position: absolute;
            right: 10px;
            top: 0;
            color: #cacaca;
            -ms-transform: scale(0.5);
            -webkit-transform: scale(0.5);
            -moz-transform: scale(0.5);
            transform: scale(0.5);
          }
        }
      }
      .main {
        margin-top: 20px;
        width: 660px;
        .main-title {
          width: 660px;
          margin-top: 20px;
          text-align: left;
          padding: 0 50px;
          img {
            width: 60px;
            height: 60px;
            border-radius: 100%;
          }
          span {
            padding-left: 20px;
            color: #aed6ff;
            font-size: 12px;
          }
        }
        .main-content {
          width: 660px;
          text-align: left;
          padding-left: 130px;
          margin-top: 10px;
          input {
            width: 400px;
            height: 40px;
            outline: none;
            // border:0;
            border: 1px solid #e8e8e8;
            border-radius: 5px;
          }
        }
        p {
          font-size: 16px;
          text-align: left;
          padding-left: 130px;
          margin-top: 10px;
        }
        .main-select {
          margin-top: 10px;
          width: 150px;
          height: 30px;
          display: flex;
          justify-content: flex-start;
          margin-left: 130px;
          // text-align: left;
          // margin-left:20px;
        }
        .main-ms {
          width: 660px;
          height: auto;
          padding-left: 130px;
          margin-top: 20px;
          // border:1px solid #e8e8e8;
          .ms-des {
            width: 500px;
            // margin-left:30px;
            textarea {
              width: 100%;
              height: 78px;
              color: #333;
              max-height: 520px;
              min-height: 78px;
              font-size: 14px;
              line-height: 24px;
              resize: none;
              border: 1px solid #e8e8e8;
              outline: none;
            }
          }
        }
        .ms-les {
          text-align: right;
        }
        .main-foot {
          display: flex;
          justify-content: space-between;
          padding: 0 50px;
          margin-top: 20px;
          padding-bottom: 30px;
          .main-foot-l {
            display: flex;
            justify-content: flex-start;
            list-style: none;
            margin-left: 80px;
            align-items: center;
            li {
              margin-left: 10px;
              font-size: 14px;
              select {
                border: 0;
                option {
                  border: 0;
                }
              }
            }
          }
          .main-foot-r {
            width: 100px;
            height: 38px;
            background: #5a90ba;
            color: #fff;
            line-height: 38px;
            font-size: 14px;
            border-radius: 10px;
            // margin-bottom: 20px;
            cursor: pointer;
            // display: flex;
            // align-items: center;
          }
        }
      }
    }
  }
}
.notlogin {
  position: fixed;
  top: 20%;
  left: 0;
  right: 0;
  z-index: 1000;
  text-align: center;
  .modelLogin {
    display: inline-block;
    width: 420px;
    padding-bottom: 10px;
    vertical-align: middle;
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #ebeef5;
    font-size: 18px;
    -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    text-align: left;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 10px;
    .title {
      padding: 15px 15px 10px;
    }
    .content {
      padding-left: 16px;
      padding-right: 12px;
    }
    .foot {
      padding: 5px 15px 0;
      text-align: right;
      button {
        display: inline-block;
        line-height: 1;
        white-space: nowrap;
        cursor: pointer;
        background: #fff;
        border: 1px solid #dcdfe6;
        color: #606266;
        -webkit-appearance: none;
        text-align: center;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        outline: 0;
        margin: 0;
        -webkit-transition: 0.1s;
        transition: 0.1s;
        font-weight: 500;
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 4px;
      }

      .type {
        color: #fff;
        background-color: #409eff;
        border-color: #409eff;
      }
    }
  }
}
.banner_img {
  height: 300px;
  width: 640px;
}
.author {
  position: fixed;
  top: 20%;
  left: 0;
  right: 0;
  z-index: 1000;
  text-align: center;
  .modelLogin {
    display: inline-block;
    width: 420px;
    padding-bottom: 10px;
    vertical-align: middle;
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #ebeef5;
    font-size: 18px;
    -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    text-align: left;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 10px;
    .title {
      padding: 15px 15px 10px;
    }
    .content {
      padding-left: 16px;
      padding-right: 12px;
    }
    .foot {
      padding: 5px 15px 0;
      text-align: right;
      button {
        display: inline-block;
        line-height: 1;
        white-space: nowrap;
        cursor: pointer;
        background: #fff;
        border: 1px solid #dcdfe6;
        color: #606266;
        -webkit-appearance: none;
        text-align: center;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        outline: 0;
        margin: 0;
        -webkit-transition: 0.1s;
        transition: 0.1s;
        font-weight: 500;
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 4px;
      }

      .type {
        color: #fff;
        background-color: #409eff;
        border-color: #409eff;
      }
    }
  }
}
</style>


